
import { MongooseFactory } from "../kalend";
import { Schema } from "mongoose";

/** 小程序活动表 */
const schema = MongooseFactory.Schema({
    createuser: {
        type: Schema.Types.ObjectId,
        ref: "platform_user"
    },
    starttime: {
        type: Date
    },
    endtime: {
        type: Date
    },
    count: {
        type: Number,
        default: 5
    },
    gamerule: {
        type: String
    },
    time: {
        type: String
    },
    gametime: {
        type: String
    },
    title: {
        type: String
    },
    headtitle: {
        type: String
    },
    items: [{
        type: Schema.Types.Mixed
    }],
    // 状态 1：有效 0：禁用
    status: {
        type: Number,
        default: 1
    }
});



export const activityModel = MongooseFactory.Model("activity", schema);